package day12.KeJian;

import java.io.FileInputStream;
import java.io.IOException;

public class Tset12 {
    public static void main(String[] args) throws IOException {
        //创建字节输入流对象
        FileInputStream fis = new FileInputStream("D://itheima//nb.txt");
        byte[] bys = new byte[1024];//1024及其整数倍
        int len;

        //循环读取
        while ((len=fis.read(bys))!=-1){
            System.out.println(new String(bys,0,len));
        }
        //释放资源
        fis.close();
    }
}
